D8.2 Advanced Topic A — Complex Numbers as a Physics Tool#


D8.2.1 Why introduce complex numbers now?#

At first glance, complex numbers can feel like a purely mathematical invention — something abstract, artificial, or disconnected from physical reality. In physics, the opposite is true.

Complex numbers arise when the real number system is no longer efficient to represent solutions to physically relevant equations of motion. In particular, they provide a natural and efficient representation for systems governed by linear differential equations with oscillatory solutions.

From this perspective, complex numbers are best understood as an expansion of the real number domain that allows us to represent oscillations, phase, and time evolution in a compact and computationally powerful way.


Why real numbers alone become inefficient#

Consider a simple oscillation written using real functions:

\[ x(t)=A\cos(\omega t+\phi). \]

While this expression is physically correct, it becomes algebraically cumbersome when we:

  • differentiate multiple times,

  • combine oscillations (just think of trigonometric identities),

  • track phase shifts,

  • or solve differential equations systematically.

By extending the number system from real numbers to complex numbers, we are not changing the physics, but changing its representation that simplifies both calculation and interpretation.


Where complex numbers appear in physics#

Complex numbers appear throughout physics because the same mathematical structure reappears:

  • Simple harmonic motion
    Linear restoring forces lead to second-order differential equations with oscillatory solutions.

  • Waves (mechanical, acoustic, electromagnetic)
    Spatial and temporal oscillations are most naturally represented using complex exponentials.

  • Electric circuits (AC analysis)
    Voltages and currents oscillate sinusoidally; complex numbers encode amplitude and phase simultaneously.

  • Electromagnetism
    Phasor methods and plane-wave solutions rely on complex representations.

  • Quantum mechanics
    Time evolution is governed by a linear differential equation whose solutions require complex numbers.

  • Signal processing
    Fourier analysis decomposes signals into complex exponentials, revealing frequency and phase content.

In each case, complex numbers appear not by choice, but by necessity, once oscillatory solutions and linearity are present.


What complex numbers actually add#

Extending from real numbers to complex numbers allows a single mathematical object to encode:

  • amplitude (via magnitude)

  • phase (via argument)

  • time evolution (via exponentiation)

Algebraic operations on complex numbers correspond directly to physical operations:

  • differentiation becomes multiplication,

  • phase shifts become rotations,

  • superposition becomes addition.

This leads to simpler expressions, fewer special cases, and clearer physical interpretation.


Why this belongs in Phase D#

Phase D is about building foundations:

  • identifying patterns in physical behavior,

  • choosing effective representations,

  • learning tools that scale to more complex systems.

Complex numbers meet all three goals.

They are introduced here not as an abstract topic, but as a practical extension of the real number system that becomes indispensable when studying oscillatory motion. Everything learned here will reappear — unchanged — in later topics such as waves, and in University Physics II: circuits, electromagnetism, and quantum physics.

The key idea to take forward is simple:

Complex numbers do not change the physics — they simplify how we represent and calculate it.


D8.2.2 What is a complex number?#

A complex number is written as

\[ z = a + ib, \]

where:

  • \(a\) is the real part, written \(\mathrm{Re}(z)=a\)

  • \(b\) is the imaginary part, written \(\mathrm{Im}(z)=b\)

  • \(i\) is defined by

\[ i^2 = -1. \]

So \(i\) is not “a new direction of real numbers,” it’s a symbol that obeys a new rule: squaring it gives \(-1\).


D8.2.3 Algebra with complex numbers (the rules you need)#

Let

\[ z_1 = a+ib,\qquad z_2 = c+id. \]

Addition and subtraction#

\[ z_1 \pm z_2 = (a\pm c) + i(b\pm d). \]

Multiplication#

Use distribution + \(i^2=-1\):

\[ (a+ib)(c+id) = ac + iad + ibc + i^2 bd = (ac-bd) + i(ad+bc). \]

Complex conjugate#

The conjugate flips the sign of the imaginary part:

\[ z^* = a - ib. \]

A key fact:

\[ zz^* = (a+ib)(a-ib)=a^2+b^2. \]

Division#

To divide, multiply top and bottom by the conjugate of the denominator:

\[ \frac{a+ib}{c+id}=\frac{(a+ib)(c-id)}{(c+id)(c-id)} =\frac{(ac+bd)+i(bc-ad)}{c^2+d^2}. \]

Example — Complex Number Algebra

We will work with two complex numbers and perform the most common algebraic operations used in physics.
Throughout, we emphasize how each operation has both an algebraic and a geometric meaning.

Let the two complex numbers be

\[ z_1 = 3 + 4i, \qquad z_2 = 1 - 2i. \]

Step 1: Modulus (magnitude)

The modulus of a complex number \(z=a+ib\) is

\[ |z|=\sqrt{a^2+b^2}. \]

For \(z_1\):

\[ |z_1|=\sqrt{3^2+4^2}=\sqrt{25}=5. \]

For \(z_2\):

\[ |z_2|=\sqrt{1^2+(-2)^2}=\sqrt{5}. \]

Geometrically, the modulus is the distance from the origin in the complex plane.


Step 2: Argument (phase)

The argument \(\theta=\arg(z)\) is the angle measured from the positive real axis:

\[ \tan\theta=\frac{b}{a}. \]

For \(z_1\):

\[ \tan\theta_1=\frac{4}{3} \quad\Rightarrow\quad \theta_1=\tan^{-1}\!\left(\frac{4}{3}\right). \]

For \(z_2\):

\[ \tan\theta_2=\frac{-2}{1}=-2 \quad\Rightarrow\quad \theta_2=\tan^{-1}(-2), \]

with the angle lying in the fourth quadrant.

The argument encodes the phase of the complex number.


Step 3: Complex conjugate

The complex conjugate of \(z=a+ib\) is

\[ z^*=a-ib. \]

So,

\[ z_1^*=3-4i, \qquad z_2^*=1+2i. \]

A key identity is

\[ zz^* = |z|^2, \]

which links algebra directly to geometry.


Step 4: Addition and subtraction

Add and subtract real and imaginary parts separately:

\[ z_1+z_2=(3+1)+(4-2)i=4+2i, \]
\[ z_1-z_2=(3-1)+(4+2)i=2+6i. \]

Geometrically, these correspond to vector-like addition and subtraction in the complex plane.


Step 5: Multiplication

Multiply using distribution and the rule \(i^2=-1\):

\[ z_1 z_2 = (3+4i)(1-2i). \]

Expand:

\[ = 3 - 6i + 4i - 8i^2 = 3 - 2i + 8 = 11 - 2i. \]

Multiplication mixes real and imaginary parts and, in polar form, corresponds to multiplying magnitudes and adding phases.


Step 6: Division

To divide, multiply numerator and denominator by the complex conjugate of the denominator:

\[ \frac{z_1}{z_2} = \frac{3+4i}{1-2i}\,\frac{1+2i}{1+2i}. \]

Denominator:

\[ (1-2i)(1+2i)=1+4=5. \]

Numerator:

\[ (3+4i)(1+2i)=3+6i+4i+8i^2= -5+10i. \]

So,

\[ \frac{z_1}{z_2}=\frac{-5+10i}{5}=-1+2i. \]

Division therefore reduces to algebra once the conjugate is used.


Key takeaway

Complex numbers behave like ordinary algebraic objects once their rules are known:

  • the modulus measures size,

  • the argument measures phase,

  • the conjugate links geometry to algebra,

  • addition and subtraction combine components,

  • multiplication and division encode both amplitude and phase changes.

These operations are exactly what make complex numbers so effective for oscillations, waves, and time-dependent physics.


D8.2.4 Graphical meaning: the complex plane#

A complex number

\[ z = a + ib \]

can be represented geometrically as a point \((a,b)\) in a two-dimensional plane:

  • the horizontal axis represents the real part

  • the vertical axis represents the imaginary part

This representation is called the complex plane.

Although this picture resembles a vector diagram, it is important to note that at this stage we are using it as a representation of a number, not yet as a physical vector. The connection between complex numbers and vectors will become explicit later.


Magnitude (modulus)#

The distance of the point \((a,b)\) from the origin is given by the Pythagorean theorem:

\[ |z|=\sqrt{a^2+b^2}. \]

This quantity is called the magnitude or modulus of the complex number.

The same result follows algebraically using the complex conjugate:

\[ z^* = a - ib, \]

so that

\[ zz^* = (a+ib)(a-ib) = a^2 + b^2. \]

Therefore,

\[ |z| = \sqrt{zz^*}. \]

This shows that the geometric distance and the algebraic construction give exactly the same physical quantity.


Angle (argument)#

The orientation of the complex number relative to the positive real axis is described by the argument \(\theta\):

\[ \theta = \arg(z). \]

From the geometry of the complex plane,

\[ \tan\theta = \frac{b}{a}, \]

with the quadrant determined by the signs of \(a\) and \(b\).

The angle \(\theta\) encodes phase information, which will later play a central role in oscillations, waves, and interference.

Hide code cell source

import numpy as np
import matplotlib.pyplot as plt

# -------------------------------------------------
# Define the complex number z = a + ib
# -------------------------------------------------
a = 3.0   # Real part
b = 2.0   # Imaginary part

z = a + 1j*b
r = np.abs(z)
theta = np.angle(z)

# -------------------------------------------------
# Create the figure
# -------------------------------------------------
fig, ax = plt.subplots(figsize=(6, 6))

# Plot the complex point
ax.plot(a, b, 'ro', label=r'$z = a + ib$')

# Line from origin to z (phasor)
ax.plot([0, a], [0, b], 'k-', linewidth=2)

# Projections onto axes
ax.plot([a, a], [0, b], 'r--', alpha=0.7)
ax.plot([0, a], [b, b], 'r--', alpha=0.7)

# Unit-circle-scaled cosine and sine components
#ax.plot([0, r*np.cos(theta)], [0.05, 0.05], 'r-', linewidth=2)
#ax.plot([0.05, 0.05], [0, r*np.sin(theta)], 'r-', linewidth=2)

# Origin
ax.plot(0, 0, 'ko')

# -------------------------------------------------
# Angle (theta) arc
# -------------------------------------------------
arc_theta = np.linspace(0, theta, 100)
arc_radius = 0.7
ax.plot(arc_radius*np.cos(arc_theta),
        arc_radius*np.sin(arc_theta),
        'k')

ax.text(0.8*np.cos(theta/2),
        0.8*np.sin(theta/2),
        r'$\theta$',
        fontsize=12)

# -------------------------------------------------
# Annotations
# -------------------------------------------------
ax.text(1, 1, r'$|z|$', fontsize=12, ha='left', va='bottom')

ax.text(1.5, -0.4, r'$a = |z|\cos\theta$', ha='center', color='b')
ax.text(-1.5, 1, r'$b = |z|\sin\theta$', va='center', color='g')

# Axes lines
ax.axhline(0)
ax.axvline(0)

# Aspect ratio and limits
ax.set_aspect('equal')
limit = max(abs(a), abs(b)) + 1
ax.set_xlim(-limit, limit)
ax.set_ylim(-limit, limit)

# Labels
ax.set_xlabel('Real Axis')
ax.set_ylabel('Imaginary Axis')

# Title
ax.set_title('Complex Number in the Polar (Complex) Plane')

# Grid
ax.grid(True)

plt.show()
../_images/ca6db1c31b1551e55f329af3974afd173e8696e712b4a5b1e9aec6da0e1eacf5.png

Why cosine and sine appear naturally#

From the right-triangle formed by \((a,b)\) and \(|z|\), we immediately have:

\[ \cos\theta = \frac{a}{|z|}, \qquad \sin\theta = \frac{b}{|z|}. \]

Solving for \(a\) and \(b\) gives:

\[ a = |z|\cos\theta, \qquad b = |z|\sin\theta. \]

Substituting back into \(z = a + ib\) yields the polar form:

\[ z = |z|(\cos\theta + i\sin\theta). \]

This form separates the complex number into:

  • a magnitude \(|z|\) (how large),

  • an angle \(\theta\) (how oriented).


Interpretation as independent directions#

The real and imaginary parts act like two independent directions:

  • the real part multiplies the number \(1\)

  • the imaginary part multiplies the number \(i\)

So we can think of

\[ z = a(1) + b(i) \]

as a combination of two perpendicular components.

This is directly analogous to how quantities are later decomposed using unit vectors (for example, \(\hat{x}\) and \(\hat{y}\)), which will be introduced formally in Phase C. The key idea is the same: a single object can be built from components along independent directions.

At this stage, complex numbers provide a numerical version of that idea.


Why this representation is powerful#

Writing complex numbers in polar form makes several operations immediate:

  • Multiplication corresponds to multiplying magnitudes and adding angles

  • Division corresponds to dividing magnitudes and subtracting angles

  • Phase shifts correspond to angle changes

  • Amplitudes correspond to magnitudes

These properties are why polar form becomes essential in oscillations, waves, and later in circuit analysis and quantum mechanics.


Key takeaway#

The complex plane allows a single mathematical object to encode both:

  • how large something is (magnitude),

  • how it is oriented (phase).

This dual information is exactly what is needed to describe oscillatory systems efficiently, which is why complex numbers become a natural language for physics.


D8.2.5 Euler’s formula and Euler’s identity#

A central result used throughout physics and engineering is Euler’s formula:

\[ e^{i\theta}=\cos\theta + i\sin\theta. \]

This relation is not a definition or a coincidence — it follows directly from the Taylor series expansions of the exponential, cosine, and sine functions.


Taylor expansions#

Recall the Taylor series about \(x=0\):

\[ e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \cdots \]
\[ \cos x = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots \]
\[ \sin x = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots \]

These series are exact representations of the functions for all real values of \(x\).


Substituting an imaginary argument#

Now replace \(x\) with \(i\theta\) in the exponential series:

\[ e^{i\theta} = 1 + i\theta + \frac{(i\theta)^2}{2!} + \frac{(i\theta)^3}{3!} + \frac{(i\theta)^4}{4!} + \cdots \]

Using \(i^2=-1\), we separate terms:

\[ e^{i\theta} = 1 + i\theta - \frac{\theta^2}{2!} - i\frac{\theta^3}{3!} + \frac{\theta^4}{4!} + i\frac{\theta^5}{5!} - \cdots \]

Grouping real and imaginary terms#

Collect real and imaginary parts separately.

Real terms:

\[ 1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - \cdots = \cos\theta \]

Imaginary terms:

\[ \theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - \cdots = \sin\theta \]

Therefore,

\[ e^{i\theta} = \cos\theta + i\sin\theta. \]

This shows that Euler’s formula follows directly from the Taylor series expansions — no additional assumptions are required.


Physical interpretation#

Euler’s formula tells us that:

  • \(\cos\theta\) is the real part of \(e^{i\theta}\)

  • \(\sin\theta\) is the imaginary part of \(e^{i\theta}\)

This is why complex exponentials naturally describe oscillations: a single exponential encodes both sine and cosine behavior at once.


Euler’s identity#

The famous special case \(\theta=\pi\) gives Euler’s identity:

\[ e^{i\pi}+1=0. \]

It links five fundamental constants: \(e\), \(i\), \(\pi\), \(1\), and \(0\), and are often considered one of the greatest equations ever.


D8.2.6 Direct application: writing oscillations and waves in complex form#

Up to this point, oscillatory motion has been written using real-valued trigonometric functions.
For example, the position of a simple oscillator is written as

\[ x(t)=A\cos(\omega t+\phi), \]

and a traveling wave is written as

\[ y(x,t)=A\cos(kx-\omega t). \]

These expressions are physically correct and measurable.
The purpose of introducing complex numbers is not to change the physics, but to introduce a representation that makes algebraic manipulation much easier.


Writing oscillations using complex exponentials#

Using Euler’s formula,

\[ e^{i\theta}=\cos\theta+i\sin\theta, \]

we can write a cosine as the real part of a complex exponential:

\[ \cos\theta=\mathrm{Re}\!\left(e^{i\theta}\right). \]

Therefore, the oscillator can be written as

\[ x(t)=\mathrm{Re}\!\left(Ae^{i(\omega t+\phi)}\right). \]

We define the complex representation

\[ \tilde{x}(t)=Ae^{i(\omega t+\phi)}, \]

with the understanding that

\[ x(t)=\mathrm{Re}\big(\tilde{x}(t)\big). \]

The physical position is always the real part; the complex quantity is a mathematical tool.

Hide code cell source

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from IPython.display import HTML, display

# -----------------------------
# Parameters (edit freely)
# -----------------------------
A = 1.0          # amplitude
f = 0.25         # frequency in Hz  (0.25 Hz = one cycle every 4 seconds)
omega = 2*np.pi*f

n_cycles = 2     # how many cycles to show
duration = n_cycles / f

fps = 30         # frames per second for the animation

# Derived arrays
n_frames = int(duration * fps)
t = np.linspace(0, duration, n_frames)
z = A * np.exp(1j * omega * t)
x = np.real(z)
y = np.imag(z)

# -----------------------------
# Figure layout
# -----------------------------
fig, (ax_c, ax_x) = plt.subplots(1, 2, figsize=(10, 4.5))

# Left: complex plane (rotation)
ax_c.set_aspect('equal')
ax_c.set_xlim(-1.2*A, 1.2*A)
ax_c.set_ylim(-1.2*A, 1.2*A)
ax_c.axhline(0)
ax_c.axvline(0)
ax_c.set_xlabel('Real axis')
ax_c.set_ylabel('Imag axis')
ax_c.set_title(r'Mathematical: $z(t)=Ae^{i\omega t}$')

# Circle guide
theta = np.linspace(0, 2*np.pi, 400)
ax_c.plot(A*np.cos(theta), A*np.sin(theta), linewidth=1, alpha=0.5)

phasor_line, = ax_c.plot([], [], linewidth=2)
point_c, = ax_c.plot([], [], marker='o')
proj_line, = ax_c.plot([], [], linestyle='--', linewidth=1.5)

# Right: real displacement vs time (physical)
ax_x.set_xlim(0, duration)
ax_x.set_ylim(-1.2*A, 1.2*A)
ax_x.axhline(0)
ax_x.set_xlabel('Time (s)')
ax_x.set_ylabel(r'Physical displacement $x(t)$')
ax_x.set_title(r'Physical: $x(t)=\mathrm{Re}[z(t)]=A\cos(\omega t)$')

trace_x, = ax_x.plot([], [], linewidth=2)
point_x, = ax_x.plot([], [], marker='o')
time_marker = ax_x.axvline(0, linestyle='--', linewidth=1)

# -----------------------------
# Animation update
# -----------------------------
def init():
    phasor_line.set_data([], [])
    point_c.set_data([], [])
    proj_line.set_data([], [])
    trace_x.set_data([], [])
    point_x.set_data([], [])
    time_marker.set_xdata([0, 0])
    return phasor_line, point_c, proj_line, trace_x, point_x, time_marker

def update(frame):
    xf, yf, tf = x[frame], y[frame], t[frame]

    phasor_line.set_data([0, xf], [0, yf])
    point_c.set_data([xf], [yf])
    proj_line.set_data([xf, xf], [0, yf])

    trace_x.set_data(t[:frame+1], x[:frame+1])
    point_x.set_data([tf], [xf])
    time_marker.set_xdata([tf, tf])

    return phasor_line, point_c, proj_line, trace_x, point_x, time_marker

ani = FuncAnimation(fig, update, frames=n_frames, init_func=init,
                    interval=1000/fps, blit=True)

display(HTML(ani.to_jshtml(fps=fps)))
plt.close(fig)

Writing traveling waves in complex form#

Similarly, a traveling wave can be written as

\[ y(x,t)=\mathrm{Re}\!\left(Ae^{i(kx-\omega t)}\right), \]

with the complex representation

\[ \tilde{y}(x,t)=Ae^{i(kx-\omega t)}. \]

This single exponential encodes:

  • the amplitude \(A\),

  • the spatial variation through \(kx\),

  • the temporal oscillation through \(\omega t\),

  • and the phase relationship between space and time.


Why algebra becomes easier#

Once oscillations are written in complex form, many operations reduce to ordinary algebra.


Phase shifts#

A phase shift is simply multiplication by a complex exponential:

\[ Ae^{i(\omega t+\phi)} = \big(Ae^{i\phi}\big)e^{i\omega t}. \]

Changing the phase does not require trigonometric identities — it is just multiplication.


Adding oscillations with the same frequency#

Consider two oscillations with the same frequency:

\[ x_1(t)=A_1\cos(\omega t+\phi_1),\qquad x_2(t)=A_2\cos(\omega t+\phi_2). \]

In complex form,

\[ x(t)=\mathrm{Re}\!\left(A_1e^{i(\omega t+\phi_1)}+A_2e^{i(\omega t+\phi_2)}\right). \]

Factor out the time dependence:

\[ x(t)=\mathrm{Re}\!\left(\big[A_1e^{i\phi_1}+A_2e^{i\phi_2}\big]e^{i\omega t}\right). \]

Define a single complex constant:

\[ C = A_1e^{i\phi_1}+A_2e^{i\phi_2}. \]

Then

\[ x(t)=\mathrm{Re}\!\left(Ce^{i\omega t}\right). \]

So the sum of two oscillations reduces to adding two complex numbers, and the resulting amplitude and phase are contained in \(C\).


Differentiation becomes simple (and why this matters later)#

Even without solving differential equations, it is useful to note that differentiation acts very simply on complex exponentials:

\[ \frac{d}{dt}\big(e^{i\omega t}\big)=i\omega e^{i\omega t}. \]

This means velocity and acceleration can be obtained by multiplication rather than repeated use of trigonometric identities, with the real part taken at the end.

More importantly, this observation explains why complex exponentials are so powerful in physics:

If a solution is assumed to have the form \(e^{i\omega t}\), then time derivatives simply multiply the function by powers of \(i\omega\).

As a result, when a linear differential equation involves time derivatives, each derivative can be replaced by an algebraic factor. Schematically,

\[ \frac{d}{dt} \;\longrightarrow\; i\omega, \qquad \frac{d^2}{dt^2} \;\longrightarrow\; -( \omega^2 ). \]

This means that linear differential equations become algebraic equations in the assumed complex form.

While we are not solving differential equations at this stage, this idea is the reason complex numbers dominate later topics such as:

  • oscillations,

  • waves,

  • AC circuits,

  • and quantum time evolution.

The key point is that complex exponentials turn calculus operations into algebraic ones, with the physical solution obtained by taking the real part at the end.


Key takeaway#

Writing oscillations and waves in complex form:

  • does not change the physical meaning,

  • keeps the measurable quantity real,

  • packages amplitude and phase into a single object,

  • turns phase shifts, addition, and differentiation into straightforward algebra.

This is why complex numbers become the standard working language for oscillations and waves throughout physics.


D8.2.7 The big-picture takeaway#

Complex numbers are not a trick.
They are not a shortcut.
They are a language.

They allow us to:

  • encode oscillation as rotation

  • track phase cleanly

  • solve differential equations elegantly

  • unify many physical systems under one framework

Learning complex numbers is learning how physicists think about time, motion, and repetition.